package com.github.demo.controller;

import com.github.demo.service.IDemoService;
import com.github.mvc.annotations.AutoWired;
import com.github.mvc.annotations.Controller;
import com.github.mvc.annotations.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 测试
 *
 * @author ArchieSean
 * @create 2023/8/31
 */
@Controller
@RequestMapping("/demo")
public class DemoController {

    @AutoWired
    private IDemoService demoService;

    /**
     * 测试
     *
     * @return str
     */
    @RequestMapping("/query")
    public String test(HttpServletRequest request, HttpServletResponse response, String name) {
        System.out.println("controller: demo 调用了==========》" + name);
        return demoService.test(name);
    }
}
